/* 容器样式 */
.dqa-container {
  position: relative;
  display: inline-block;
  margin-right: 8px;
}

.dqa-btn-group {
  display: flex;
  align-items: center;
  border: 1px solid var(--borderColor-default);
  border-radius: 6px;
  box-shadow: var(--shadow-resting-xsmall);
  height: 28px;
  overflow: hidden; /* 确保子元素的背景不会溢出圆角 */
}

/* 主按钮 */
.dqa-main-btn {
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  color: var(--fgColor-default);
  text-decoration: none;
  border-right: 1px solid var(--borderColor-default);
  height: 100%;
  background-color: var(--button-default-bgColor-rest);
  transition: background-color 0.2s;
}

.dqa-main-btn:hover {
  text-decoration: none;
  background-color: var(--button-default-bgColor-hover);
}

.dqa-main-btn svg {
  margin-right: 5px;
}

/* 下拉触发器 */
.dqa-dropdown-trigger {
  display: flex;
  align-items: center;
  padding: 0 8px;
  cursor: pointer;
  line-height: 20px;
  color: var(--fgColor-muted);
  height: 100%;
  background-color: var(--button-default-bgColor-rest);
  transition: background-color 0.2s;
}

.dqa-dropdown-trigger:hover {
  background-color: var(--button-default-bgColor-hover);
}

.dqa-dropdown-trigger svg {
  fill: currentColor;
}

/* 下拉菜单 */
.dqa-dropdown-menu {
  display: none;
  border: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 200px;
  background-color: var(--overlay-bgColor);
  border-radius: 6px;
  box-shadow: var(--shadow-floating-medium);
  z-index: 99;
}

.dqa-container.open .dqa-dropdown-menu {
  display: block;
}

.dqa-dropdown-header {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--borderColor-muted);
}

.dqa-dropdown-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dqa-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 12px;
  border-bottom: 1px solid var(--borderColor-muted);
  cursor: pointer;
}
.dqa-dropdown-item:last-child {
  border-bottom: none;
}

.dqa-dropdown-item:hover {
  background-color: var(--control-bgColor-hover);
}

.dqa-item-link {
  display: flex;
  align-items: center;
  color: var(--fgColor-default);
  text-decoration: none;
  flex-grow: 1;
}

.dqa-item-link svg {
  margin-right: 8px;
  color: var(--fgColor-muted);
}

.dqa-pin-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 4px;
  color: var(--fgColor-muted);
}

.dqa-pin-btn.pinned svg {
  color: var(--fgColor-accent);
}

/* GitHub 的 CSS 变量会自动适配所有主题，无需额外样式 */
